package com.tianji.remark.controller;

import com.tianji.remark.entity.dto.LikeRecordFormDTO;
import com.tianji.remark.entity.po.LikedRecord;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.tianji.remark.service.ILikedRecordService;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;

/**
 * <p>
 * 点赞记录表 控制器
 * </p>
 *
 * @author lemon
 */
@Api(tags = "点赞管理")
@RestController
@RequiredArgsConstructor
@RequestMapping("/likes")
public class LikedRecordController {

    private final ILikedRecordService likedRecordService;


    @ApiOperation("新增取消点赞记录")
    @PostMapping
    public void saveLikedRecord(@RequestBody @Validated LikeRecordFormDTO dto) {
        likedRecordService.saveLikedRecord(dto);
    }

}
